define(function (require, exports, module) {

    var mCard = require('andrew/card/index.js');


    Vue.component('button-counter', {
        template: '<button v-on:click="increment">{{ counter }}</button>',
        data: function () {
            return {
                counter: 0
            }
        },
        methods: {
            increment: function () {
                this.counter += 1;
                this.$emit('increment', "这个位子是可以加参数的");//触发自定义increment1的函数。此处的increment1函数就是 incrementTotal1函数。
            }
        }
    });

    
    new Vue({
        el: '#app',
        data: {
            total: 0
        },
        methods: {
            incrementTotal1: function (e) {
                this.total += 1;
            },
            incrementTotal2: function () {
                this.total += 1;
            }
        }
    })




});